s with any leading/trailing spaces removed - trimming, e.g. cleaning up a name typed on an entry screen.
string_trim(s) -> string| Name | Type |
|---|---|
s | string |
string
s with any leading/trailing spaces removed - trimming, e.g. cleaning up a name typed on an entry screen.
Only the plain space character counts as whitespace. A new line ("\n", see Special characters in a string) is a character like any other, so it is not trimmed off.
var typed = " Ripley ";
var cleaned = string_trim(typed);
var has_content = string_length(cleaned) > 0;Only the plain space character (0x20) counts as whitespace - GBML has no escape for a tab or newline inside a string, and nothing on this hardware types one into a runtime string either.